<page-bar></page-bar>

<nz-list *ngIf="user" nzItemLayout="horizontal">
  <nz-list-item [nzActions]="[dd]" style="border-bottom: 1px solid rgb(230, 230, 230);">
    <ng-template #dd>
      <a *ngIf="!user.ddId" (click)="bind('dd')" class="text-success">绑定</a>
      <a *ngIf="user.ddId" (click)="unbind('dd', '钉钉')" class="text-error">解绑</a>
    </ng-template>
    <nz-list-item-meta nzTitle="绑定钉钉" [nzAvatar]="githubAvatar"
      [nzDescription]="user.ddId ? '当前已绑定钉钉账号，可以通过App扫码登录，接收站内消息' : '当前未绑定钉钉账号'">
      <ng-template #githubAvatar>
        <i style="font-size: 32px;" class="iconfont icon-dingding"></i>
      </ng-template>
    </nz-list-item-meta>
  </nz-list-item>
</nz-list>
